import request from '@/utils/request'

// 查询库存--刮刮乐列表
export function listInventoryGgl(query) {
  return request({
    url: '/system/inventoryGgl/list',
    method: 'get',
    params: query
  })
}

// 查询库存--刮刮乐详细
export function getInventoryGgl(id) {
  return request({
    url: '/system/inventoryGgl/' + id,
    method: 'get'
  })
}

export function getInvByDeptIdAndSalesIdAndClassCode(query) {
  return request({
    url: '/system/inventoryGgl/getInvByDeptIdAndSalesIdAndClassCode',
    method: 'get',
    params: query
  })
}

export function getDeptMaterialInfoByDeptIdAndMaterialId(query) {
  return request({
    url: '/system/inventoryGgl/getDeptMaterialInfoByDeptIdAndMaterialId',
    method: 'get',
    params: query
  })
}

// 新增库存--刮刮乐
export function addInventoryGgl(data) {
  return request({
    url: '/system/inventoryGgl',
    method: 'post',
    data: data
  })
}

// 修改库存--刮刮乐
export function updateInventoryGgl(data) {
  return request({
    url: '/system/inventoryGgl',
    method: 'put',
    data: data
  })
}

// 删除库存--刮刮乐
export function delInventoryGgl(id) {
  return request({
    url: '/system/inventoryGgl/' + id,
    method: 'delete'
  })
}
